﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace PdfLib.TextScraping
{
    /// <summary>
    /// 
    /// </summary>
    public class TableHeaderDetector
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pdfFilePath"></param>
        /// <param name="pageNum"></param>
        /// <param name="headerDetector"></param>
        /// <returns></returns>
        public static double DetectTableHeader(
            string pdfFilePath, 
            int pageNum, 
            TableHeaderDetectorInstruction headerDetector)
        {
            double matchScore = 0.0;
            PdfPatternSearcher.FoundPattern(
                pdfFilePath, pageNum,
                headerDetector.TableHeader,
                headerDetector.UseRegexMatch,
                headerDetector.MatchScoreThreshold, 
                ref matchScore);
            return matchScore;
        }
    }
}
